/*
 * Created on 2005-1-25
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package org.karelun.gef.policies;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.ComponentEditPolicy;
import org.eclipse.gef.requests.GroupRequest;
import org.karelun.gef.commands.DeleteNodeCommand;

public class DeleteNodeEditPolicy extends ComponentEditPolicy {

    protected Command createDeleteCommand(GroupRequest deleteRequest) {
        DeleteNodeCommand deleteCommand = new DeleteNodeCommand();
        deleteCommand.setParent(getHost().getParent().getModel());
        deleteCommand.setNode( getHost().getModel());
        return deleteCommand;
    }
}
